<?php

$ip = "219.150.45.10";

$url = "http://ip.taobao.com/service/getIpInfo.php?ip=".$ip;


// $ch = curl_init();

// curl_setopt($ch,CURLOPT_URL,$url);

// curl_setopt($ch,CURLOPT_RETURNTRANSFER,1);

// curl_setopt($ch,CURLOPT_HEADER,0);

// $output = curl_exec($ch);//执行请求

// var_dump($output);
$data = file_get_contents($url);

var_dump(json_decode($data,true));